#include "trap.h"
    .set noat
    .globl main
    .data 
    data1: .word 0x11223344
    .text
main:   
    # lh
    ori $t1, $zero, 0x3040
    la $at, data1
    lh $t0, 0x0($at) # $t0=0x00003344
    andi $t0, $t0, 0xf0f0 # $t0=0x00003040
    # bne $t1, $t0, error
    
    # sw lbu
    lui $t1, 0xabef
    ori $t1, 0xcdef # $t1=0xabefcdef
    sw $t1, 0x4($at) # [0x4-0x7]=ef cd ef ab
    lbu $t0, 0x7($at) # $t0=0x000000ab 
    sll $t0, $t0, 0x4 # $t0=0x00000ab0 
    # blez $t0, error

    sh $t0, 0x2($at) # [0x0-0x3]=44 33 0a b0
    lw $t1, 0x0($at) # $t1=0x0ab03344
    mult $t1, $t0 # $t0=0x00000ab0 $t1=0x0ab03344
    mfhi $t2 # $t2=0x0000072
    ori $t0, $zero, 0x0072
    # bne $t0, $t2, error

    ori $t0, $zero, 0x0005
    divu $zero, $t2, $t0
    mfhi $t1
    ori $t0, $zero, 0x0004
    # bne $t0, $t1, error
    
    lui $t1, 0x1234
    ori $t1, $t1, 0x5678
    HIT_GOOD_TRAP		# stop temu

  # j error